{% block head %}
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{{ url_for('app_timer.static', filename='style.css') }}" rel="stylesheet">
<link rel="shortcut icon" href="{{ url_for('app_timer.static', filename='favicon.ico') }}" type="image/x-icon">
{% endblock %}

{% block page_content %}
<audio id="over_music">
    <source src="{{ url_for('app_timer.static', filename='beepbeep.mp3') }}">
</audio>

<div>
    <form method="POST" action="{{ url_for('app_timer.custom') }}" style="display:inline">
        <input name="strtime" class="time-input" placeholder="例如 18:00">
        <input type="submit" class="startButton" value="START">
    </form>
    &nbsp;&nbsp;
 <a class="workButton" href="{{ url_for('app_timer.custom2',strtime='17:30') }}" >17:30</a>
 <a class="restButton" href="{{ url_for('app_timer.custom2',strtime='18:00') }}" >18:00</a>
 <a class="pomodoro" href="{{ url_for('app_timer.custom2',strtime='18:30') }}" >18:30</a>
    <a class="helpButton" id="help-btn">?</a>

    {% for message in get_flashed_messages() %}
    <div class="alert-info">
        {{ message }}
    </div>
    {% endfor %}

    <div class="usage" id="help-info">
        <p>使用方法</p>
        <p>左侧输入，例如17:30、18:00、18:30</p>
        </p>
    </div>
</div>

<a class="github" href="https://gitee.com/feko/flask-countdown/tree/master" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ url_for('app_timer.static', filename='widget_1.svg') }}" alt="Fork me on Gitee"></a>
<div>
    {#% if True %}yay{% endif %#}
</div>

<div class="timer">
    <p id="time"></p>
</div>

<div class="quote">
    <p id="quote"></p>
	<i id="author"></i>
</div>

<div class="footer">
    <a href="/timer" target="_blank">Home</a>
</div>
{% endblock %}

{% block scripts %}
<script src="{{ url_for('app_timer.static', filename='js/jquery.min.js') }}"></script>
<script src="{{ url_for('app_timer.static', filename='js/timer.js') }}"></script>
<script>
  var Seconds = {{ num }};
</script>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-87062131-1', 'auto');
  ga('send', 'pageview');
</script>

<script type="text/javascript">
    function parseQuote(response)
    {
        document.getElementById("quote").innerHTML = response.quoteText;
        document.getElementById("author").innerHTML = response.quoteAuthor;
    }
</script>

<script type="text/javascript" src="http://api.forismatic.com/api/1.0/?method=getQuote&amp;format=jsonp&amp;lang=en&amp;jsonp=parseQuote" async></script>

{% endblock %}
